<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
    <title>芳小微宣</title>
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/swiper.min.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/index.js"></script>
    <script src="js/swiper.jquery.min.js"></script>
    <style>
        .swiper-wrapper  img{
            width: 100%;height:200px;
        }
    </style>
</head>
<body>
<div class="swiper-container" style=" margin-bottom: 20px;">
    <div class="swiper-wrapper">
       <!-- <div class="swiper-slide">
            <img src="images/index_top.png"/>
        </div>
        <div class="swiper-slide">
            <img src="images/honorBg.png"/>
        </div>
        <div class="swiper-slide">
            <img src="images/banner1.png"/>
        </div>-->
    </div>
    <!-- 如果需要分页器 -->
    <div class="swiper-pagination"></div>
</div>

<div>
    <div class="singleTit">
        <a href="tzggList.html">
            <img src="images/gonggao.png"/><br>
            <span>通知公告</span>
         </a>
    </div>
    <div class="singleTit">
        <a href="schoolList.html">
            <img src="images/xuanchan.png"/><br>
            校园宣传
        </a>
    </div>
    <div class="singleTit">
        <a href="readBest.html">
            <img src="images/tushuguan.png"/><br>
            最佳读者
        </a>
    </div>
    <div class="singleTit">
        <a href="chooseClass.html">
            <img src="images/honor.png"/><br>
            荣誉墙
        </a>
    </div>
    <div class="singleTit">
        <a href="classStyle.html">
            <img src="images/bjfc.png"/><br>
            班级风采
        </a>
    </div>
    <div class="singleTit">
        <a href="weekPlan.html">
            <img src="images/plan.png"/><br>
            一周计划
        </a>
    </div>
   <!--<div class="singleTit">-->
        <!--<a href="jdList.html">-->
            <!--<img src="images/jdyy.png"/><br>-->
            <!--基地预约-->
        <!--</a>-->
    <!--</div>-->
    <div class="singleTit">
        <a href="videoList.html">
            <img src="images/video.png"/><br>
            班级视频
        </a>
    </div>
</div>
<script>

    $.ajax({
        type : "POST",
        url : path + "/api/weixin/getSchoolImgs?token=" + window.localStorage.getItem("token"),
        data : {},
        dataType : 'json',
        success : function(msg) {
            if(msg.code == 0){
                var html = "";
                for(var i=0;i<msg.schoolImgs.length;i++){
                    html+='<div class="swiper-slide"><img src="'+ photoPath + msg.schoolImgs[i].imgUrl +'"/></div>';
                }
               $(".swiper-wrapper").html(html);
                var mySwiper = new Swiper ('.swiper-container', {
                    autoplay : 3000,
                    speed:300,
                    loop: true,
                    // 如果需要分页器
                    pagination: '.swiper-pagination'
                })
            }else if(msg.code == 501){
                window.location.href = "login.html";
            }
        }
    })

</script>
</body>
</html>